package com.kinyx.framework.db.sentence.res;

import com.kinyx.framework.db.configs.DBConfigs;

import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;

/**
 * 表达式子句
 */
@RequiredArgsConstructor(access = AccessLevel.PACKAGE)
abstract class _Expression extends _Sentence {

	/** 列子句 */
	private final Column column;
	/** 表达式类型 */
	private final String expressionType;

	@Override
	public String getSentence(final DBConfigs configs, final boolean isSQL, final boolean withTableAlias) {
		return this.column.getSentence(configs, isSQL, withTableAlias) + " " + this.expressionType;
	}

}
